<?php

/**
 * DiscountDetail form.
 *
 * @package    photobook
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class DiscountDetailForm extends BaseDiscountDetailForm
{
  public function configure()
  {
      //$this->useFields(array('quantity_from','quantity_to','discount_percent','discount_value'));
      $this->setWidgets(array(
          'quantity_from'    => new sfWidgetFormInputText(),
          'quantity_to'   => new sfWidgetFormInputText(),
          'discount_percent' => new sfWidgetFormInputText(),
          'discount_value' => new sfWidgetFormInputText(),
        ));
        //$this->widgetSchema->setNameFormat('contact[%s]');

        $this->setValidators(array(
          'quantity_from'    => new sfValidatorString(array('required' => false)),
          'quantity_to'   => new sfValidatorString(array('required' => false)),
          'discount_percent' => new sfValidatorString(array('required' => false)),
          'discount_value' => new sfValidatorString(array('required' => false)),
        ));
  }
}
